package example.simple_mindmap.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
@Data
@TableName("t_message")
public class Message {
    @TableId(value = "id", type = IdType.AUTO)
    //消息id
    private Long id;
    //发送id
    private Long pid;
    //接收id
    private Long rid;
    //消息正文
    private String content;
    //类别：0：消息 1：评论回复 2：系统通知
    private Short type;
    //状态：0：未读；1：已读未回，2：已读已回
    private Short state;
    //创建时间
    @JsonFormat( pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField(value = "createTime")
    private Date createTime;

}
